// vite.config.ts
import { defineConfig } from "file:///E:/BLOG/vue3-ts-vite/node_modules/vite/dist/node/index.js";
import vue from "file:///E:/BLOG/vue3-ts-vite/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///E:/BLOG/vue3-ts-vite/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import { resolve } from "path";
import vueSetupExtend from "file:///E:/BLOG/vue3-ts-vite/node_modules/vite-plugin-vue-setup-extend/dist/index.mjs";
import AutoImport from "file:///E:/BLOG/vue3-ts-vite/node_modules/unplugin-auto-import/dist/vite.js";
import viteCompression from "file:///E:/BLOG/vue3-ts-vite/node_modules/vite-plugin-compression/dist/index.mjs";
import Components from "file:///E:/BLOG/vue3-ts-vite/node_modules/unplugin-vue-components/dist/vite.mjs";
import { ElementPlusResolver } from "file:///E:/BLOG/vue3-ts-vite/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import Unocss from "file:///E:/BLOG/vue3-ts-vite/node_modules/unocss/dist/vite.mjs";
import {
  presetAttributify,
  presetIcons,
  presetUno,
  transformerDirectives,
  transformerVariantGroup
} from "file:///E:/BLOG/vue3-ts-vite/node_modules/unocss/dist/index.mjs";
var __vite_injected_original_dirname = "E:\\BLOG\\vue3-ts-vite";
var vite_config_default = defineConfig({
  // 配置NG——这个是与后台、运维约定好的，做NG转发；即主应用地址+子应用base就会直接NG转发
  base: "/",
  resolve: {
    // 配置别名
    alias: {
      "@": resolve(__vite_injected_original_dirname, "src")
      // components: resolve(__dirname, 'src/components')
    },
    // 类型： string[] 导入时想要省略的扩展名列表。
    extensions: [".js", ".ts", ".jsx", ".tsx", ".json", ".vue", ".mjs", ".d.ts"]
  },
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: `@use "@/styles/element/index.scss" as *;`
      }
    }
  },
  plugins: [
    vue(),
    vueJsx(),
    vueSetupExtend(),
    AutoImport({
      imports: ["vue", "vue-router", "pinia"],
      // 自动导入vue、vue-router、pinia相关API
      dts: "src/auto-import.d.ts"
      // 生成 `auto-import.d.ts` 全局声明
    }),
    viteCompression({
      verbose: true,
      disable: false,
      // 不禁用压缩
      deleteOriginFile: false,
      // 压缩后是否删除原文件
      threshold: 10240,
      // 压缩前最小文件大小
      algorithm: "gzip",
      // 压缩算法
      ext: ".gz"
      // 文件类型
    }),
    Components({
      // allow auto load markdown components under `./src/components/`
      extensions: ["vue", "md"],
      // allow auto import and register components used in markdown
      include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
      resolvers: [
        ElementPlusResolver({
          importStyle: "sass"
        })
      ],
      dts: "src/components.d.ts"
    }),
    // https://github.com/antfu/unocss
    // see unocss.config.ts for config
    Unocss({
      presets: [
        presetUno(),
        presetAttributify(),
        presetIcons({
          scale: 1.2,
          warn: true
        })
      ],
      transformers: [
        transformerDirectives(),
        transformerVariantGroup()
      ]
    })
  ],
  server: {
    headers: {
      "Access-Control-Allow-Origin": "*"
    },
    host: "0.0.0.0",
    port: 8080,
    open: true,
    https: false,
    proxy: {
      "^/api": {
        target: process.env.VITE_APP_BASE_API,
        changeOrigin: true,
        rewrite: (p) => p.replace(/^\/api/, "")
      }
      // '^/portal-user': {
      //   target: `http://10.0.10.240:8172`,
      //   changeOrigin: true,
      //   rewrite: (p) => p.replace(/^\/portal-user/, '/portal-user')
      // },
      // '^/portal-sso': {
      //   target: `http://10.0.10.240:8171`,
      //   changeOrigin: true,
      //   rewrite: (p) => p.replace(/^\/portal-sso/, '/portal-sso')
      // }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJFOlxcXFxCTE9HXFxcXHZ1ZTMtdHMtdml0ZVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9I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